package com.gaodun.hk.common.response;

/**
 * @author fengyamin
 * @date 2020/04/14
 **/
public enum StatusCode implements IStatusCode {
    // Common
    SUCCESS(0, "请求成功"),
    FAILED(1, "请求失败"),
    UNAUTHORIZED(3, "用户未登录或登录超时。"),
    SYSTEM_ERROR(4, "系统异常"),
    INTERNAL_SERVICE_ERROR(9, "内部服务异常"),
    NO_DATA(3000, "未匹配到数据"),
    BAD_PARAMETER(3001, "错误参数");

    private int code;
    private String message;

    StatusCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
